ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.Direct3D11 Namespace / Buffer Class / Create Method / Create<T>(Device,BindFlags,T[],Int32,ResourceUsage,CpuAccessFlags,ResourceMiscFlags,Int32) Method
Type of the data to upload
The device with which to associate the buffer.
Flags specifying how the buffer will be bound to the pipeline.
Initial data used to initialize the buffer.
The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.
The usage pattern for the buffer.
Flags specifying how the buffer will be accessible from the CPU.
Miscellaneous resource options.
The size (in bytes) of the structure element for structured buffers.

In This Topic
    Create<T>(Device,BindFlags,T[],Int32,ResourceUsage,CpuAccessFlags,ResourceMiscFlags,Int32) Method
    In This Topic
    Creates a new instance of the Buffer class.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Create(Of T As {New, Struct})( _
       ByVal device As Device, _
       ByVal bindFlags As BindFlags, _
       ByVal data() As T, _
       Optional ByVal sizeInBytes As System.Integer, _
       Optional ByVal usage As ResourceUsage, _
       Optional ByVal accessFlags As CpuAccessFlags, _
       Optional ByVal miscFlags As ResourceMiscFlags, _
       Optional ByVal structureByteStride As System.Integer _
    ) As Buffer
    public static Buffer Create<T>( 
       Device device,
       BindFlags bindFlags,
       T[] data,
       System.int sizeInBytes,
       ResourceUsage usage,
       CpuAccessFlags accessFlags,
       ResourceMiscFlags miscFlags,
       System.int structureByteStride
    )
    where T: new(), struct

    Parameters

    device
    The device with which to associate the buffer.
    bindFlags
    Flags specifying how the buffer will be bound to the pipeline.
    data
    Initial data used to initialize the buffer.
    sizeInBytes
    The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.
    usage
    The usage pattern for the buffer.
    accessFlags
    Flags specifying how the buffer will be accessible from the CPU.
    miscFlags
    Miscellaneous resource options.
    structureByteStride
    The size (in bytes) of the structure element for structured buffers.

    Type Parameters

    T
    Type of the data to upload

    Return Value

    An initialized buffer
    See Also